//package com.breakfast.fun.ui.user.address;
//
//import com.breakfast.fun.base.BaseModel;
//import com.breakfast.fun.base.BasePresenter;
//import com.breakfast.fun.base.BaseView;
//import com.breakfast.fun.data.entity.user.address.Building;
//import com.breakfast.fun.data.entity.user.address.Road;
//
//import java.util.Map;
//
//import retrofit2.http.FieldMap;
//import rx.Observable;
//
///**
// * Created by yukai on 16/9/15.
// */
//public interface ChooseBuildingContract {
//    interface Model extends BaseModel {
//        Observable<Road> getRoadModel(@FieldMap Map<String,String> map);
//        Observable<Building> getBuildingModel(@FieldMap Map<String,String> map);
//        Observable<Building> getSearchBuildingModel(@FieldMap Map<String,String> map);
//    }
//
//    interface View extends BaseView {
//        void showBuilding(Building building);
//        void dialToServer();
//        void showRoad(Road road);
//        void setAdapterStatus();
//    }
//
//    abstract class Presenter extends BasePresenter<Model,View> {
//        public abstract void getBuilding(int roadId);
//        public abstract void getRoad();
//        public abstract void searchBuilding(String building,boolean isLocated);
//    }
//}

package com.breakfast.fun.ui.user.address;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.user.address.Building;
import com.breakfast.fun.data.entity.user.address.Road;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/9/15.
 */
public interface ChooseBuildingContract {
    interface Model extends BaseModel {
        Observable<Road> getRoadModel(@FieldMap Map<String, String> map);

        Observable<Building> getBuildingModel(@FieldMap Map<String, String> map);

        Observable<Building> getSearchBuildingModel(@FieldMap Map<String, String> map);
    }

    interface View extends BaseView {
        void showBuilding(Building building);

        void showRoad(Road road);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void getBuilding(int roadId);

        public abstract void getRoad();

        public abstract void searchBuilding(String building);
    }
}
